<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS冲突修复验证</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .header {
            text-align: center;
            margin-bottom: 30px;
            color: #333;
        }
        .test-section {
            margin-bottom: 30px;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .test-title {
            color: #2c3e50;
            margin-bottom: 15px;
            font-size: 18px;
            font-weight: bold;
        }
        .test-item {
            margin: 10px 0;
            padding: 10px;
            background: #f8f9fa;
            border-left: 4px solid #007cba;
        }
        .success {
            border-left-color: #00a32a;
            background-color: #f0f9ff;
        }
        .warning {
            border-left-color: #dba617;
            background-color: #fff8e1;
        }
        .error {
            border-left-color: #d63638;
            background-color: #ffebee;
        }
        .feather-icon {
            font-family: 'feather';
            font-size: 16px;
            margin-right: 5px;
        }
        .btn {
            display: inline-block;
            padding: 8px 16px;
            background: #007cba;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            margin: 5px;
        }
        .btn:hover {
            background: #005a87;
        }
        .modal-test {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            z-index: 1050;
            display: none;
        }
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1040;
            display: none;
        }
        .sticky-header-test {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: #333;
            color: white;
            padding: 10px 0;
            text-align: center;
            z-index: 1030;
            display: none;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>CSS冲突修复效果验证</h1>
            <p>此页面用于验证WordPress主题CSS冲突修复的效果</p>
        </div>

        <div class="test-section">
            <div class="test-title">1. CSS加载顺序验证</div>
            <div class="test-item success">
                <strong>✓ 预期顺序：</strong> plugin.css → collection.css → feather.css → blog.css → other-pages.css → product-page.css → style1.css
            </div>
            <div class="test-item">
                <strong>验证方法：</strong> 在WordPress页面中查看源代码，检查&lt;link&gt;标签的顺序
            </div>
        </div>

        <div class="test-section">
            <div class="test-title">2. 图标字体测试</div>
            <div class="test-item">
                <span class="feather-icon">&#xe84f;</span> 搜索图标测试
                <span class="feather-icon">&#xe8b6;</span> 购物车图标测试  
                <span class="feather-icon">&#xe8a6;</span> 用户图标测试
            </div>
            <div class="test-item success">
                <strong>预期结果：</strong> 图标应正常显示，不应显示为方块或乱码
            </div>
        </div>

        <div class="test-section">
            <div class="test-title">3. Z-index层级测试</div>
            <div class="test-item">
                <button class="btn" onclick="showModal()">测试模态框 (z-index: 1050)</button>
                <button class="btn" onclick="showStickyHeader()">测试粘性头部 (z-index: 1030)</button>
            </div>
            <div class="test-item success">
                <strong>预期结果：</strong> 模态框应在粘性头部之上显示
            </div>
        </div>

        <div class="test-section">
            <div class="test-title">4. WordPress默认样式移除验证</div>
            <div class="test-item">
                <strong>检查项：</strong>
                <ul>
                    <li>wp-block-library 样式已移除</li>
                    <li>classic-theme-styles 样式已移除</li>
                    <li>global-styles 样式已移除</li>
                </ul>
            </div>
            <div class="test-item warning">
                <strong>验证方法：</strong> 在浏览器开发者工具的Network标签中查看是否还有这些CSS文件的请求
            </div>
        </div>

        <div class="test-section">
            <div class="test-title">5. Bootstrap样式优先级验证</div>
            <div class="test-item">
                <div class="row">
                    <div class="col-md-4">第一列</div>
                    <div class="col-md-4">第二列</div>
                    <div class="col-md-4">第三列</div>
                </div>
            </div>
            <div class="test-item success">
                <strong>预期结果：</strong> Bootstrap网格系统应正常工作
            </div>
        </div>

        <div class="test-section">
            <div class="test-title">6. 响应式图片测试</div>
            <div class="test-item">
                <img src="" 
                     class="img-fluid" alt="测试图片">
            </div>
            <div class="test-item success">
                <strong>预期结果：</strong> 图片应具有max-width: 100%和height: auto属性
            </div>
        </div>

        <div class="test-section">
            <div class="test-title">7. 性能检查清单</div>
            <div class="test-item">
                <strong>检查点：</strong>
                <ul>
                    <li>☐ CSS文件总数是否合理（建议少于10个）</li>
                    <li>☐ 是否存在重复的CSS规则</li>
                    <li>☐ 是否有未使用的CSS文件</li>
                    <li>☐ 关键CSS是否内联</li>
                </ul>
            </div>
        </div>

        <div class="test-section">
            <div class="test-title">8. 浏览器兼容性测试</div>
            <div class="test-item">
                <strong>测试浏览器：</strong>
                <ul>
                    <li>☐ Chrome (最新版)</li>
                    <li>☐ Firefox (最新版)</li>
                    <li>☐ Safari (最新版)</li>
                    <li>☐ Edge (最新版)</li>
                </ul>
            </div>
        </div>
    </div>

    <!-- 测试模态框 -->
    <div class="overlay" id="overlay" onclick="hideModal()"></div>
    <div class="modal-test" id="modal">
        <h3>测试模态框</h3>
        <p>这是一个测试模态框，用于验证z-index层级是否正确。</p>
        <button class="btn" onclick="hideModal()">关闭</button>
    </div>

    <!-- 测试粘性头部 -->
    <div class="sticky-header-test" id="stickyHeader">
        测试粘性头部 - Z-index: 1030
        <button onclick="hideStickyHeader()" style="margin-left: 20px; background: transparent; border: 1px solid white; color: white; padding: 2px 8px;">隐藏</button>
    </div>

    <script>
        function showModal() {
            document.getElementById('overlay').style.display = 'block';
            document.getElementById('modal').style.display = 'block';
        }

        function hideModal() {
            document.getElementById('overlay').style.display = 'none';
            document.getElementById('modal').style.display = 'none';
        }

        function showStickyHeader() {
            document.getElementById('stickyHeader').style.display = 'block';
        }

        function hideStickyHeader() {
            document.getElementById('stickyHeader').style.display = 'none';
        }

        // 页面加载完成后进行自动检查
        document.addEventListener('DOMContentLoaded', function() {
            console.group('CSS冲突修复验证');
            
            // 检查img-fluid类
            const images = document.querySelectorAll('.img-fluid');
            if (images.length > 0) {
                console.log('✓ 找到', images.length, '个使用img-fluid类的图片');
            }
            
            // 检查Bootstrap网格
            const rows = document.querySelectorAll('.row');
            if (rows.length > 0) {
                console.log('✓ 找到', rows.length, '个Bootstrap行元素');
            }
            
            // 检查字体图标
            const featherIcons = document.querySelectorAll('.feather-icon');
            if (featherIcons.length > 0) {
                console.log('✓ 找到', featherIcons.length, '个feather图标');
            }
            
            console.log('验证完成。请在WordPress页面中进一步测试。');
            console.groupEnd();
        });
    </script>
</body>
</html>